<template>
  <div v-html="data.data.content">
  </div>
</template>

<script>
import { ref } from 'vue';


export default {
  setup() {
    const data = ref({
      msg: "",
      state: "",
      data: {
        id: '',
        content: "",
      }
    });

    // 请求本地JSON数据
    const loadData = async () => {
      const response = await fetch('/data/list.json');
      const jsonData = await response.json();
      data.value = jsonData;
    };

    // 在组件加载时加载数据
    loadData();

    return { data };
  },
};

</script>
<style></style>